#!/usr/bin/python
# Filename: using_tuple.py
# list using []
# tuple using ()
# This is the difference between the list and tuple
zoo = ('wolf', 'elephant', 'penguin')
print 'Number of animals in the zoo is', len(zoo)

new_zoo = ('monkey', 'dolphin', zoo)
print 'Number of animals in the new zoo is', len(new_zoo)
print 'All animaols int the new zoo are',new_zoo

print 'Animals brought from old zoo are', new_zoo[2]
print 'Last ainimal brought from old zoo is', new_zoo[2][2]

another_zoo = ['chicken','tiger',new_zoo]
print 'Another_zoo have the animals', another_zoo
print 'The ainimals from new_zoo are', another_zoo[2]

#tuple has just 0 or 1 element
b_zoo = ('lion')
singleton = (2, )
myempty = ()
mylist = ['dolphin' , 'horse']
c_zoo = ('dog', b_zoo , myempty , mylist , singleton)
print c_zoo
print c_zoo[3][0]
print c_zoo[4][0]
